package com.zstu.mall.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.zstu.mall.common.BaseEntity;
import java.io.Serializable;
import java.util.Date;

import javax.persistence.*;

/**
 * @author     : wuyc
 * @description: user_order
 * @date       : Created in 2019/11/24
 */
@Entity
@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" })
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Table(name = "user_order")
public class UserOrder extends BaseEntity implements Serializable {

	/**
	 * null
	 * default value: ' '
	 */
	@Column(name = "product_id", nullable = false,length = 255)
	private String productId;

	/**
	 * 订单号,未下前为' '
	 * default value: ' '
	 */
	@Column(name = "order_id", nullable = false,length = 255)
	private String orderId;

	/**
	 * null
	 * default value: 0
	 */
	@Column(name = "number", nullable = false,length = 50)
	private Double number;

	/**
	 * null
	 * default value: 0
	 */
	@Column(name = "total", nullable = false,length = 50)
	private Double total;

	/**
	 * 备用1
	 * default value: ' '
	 */
	@Column(name = "string1", nullable = false,length = 255)
	private String string1;

	/**
	 * null
	 * default value: ' '
	 */
	@Column(name = "string2", nullable = false,length = 255)
	private String string2;

	/**
	 * null
	 * default value: ' '
	 */
	@Column(name = "string3", nullable = false,length = 255)
	private String string3;

	@Transient
	private Product product;

	public UserOrder() {
		super(); 
		super.status = "0";
		super.remark = " ";
		super.gmtCreate = new Date();
		super.gmtModified = new Date();
		this.productId = " ";
		this.orderId = " ";
		this.number = 1.0;
		this.total = 0.0;
		this.string1 = " ";
		this.string2 = " ";
		this.string3 = " ";
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}
	
	public String getProductId() {
		return this.productId;
	}
	
	public void setProductId(String productId) {
		this.productId = productId;
	}
	
	public String getOrderId() {
		return this.orderId;
	}
	
	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
	
	public Double getNumber() {
		return this.number;
	}
	
	public void setNumber(Double number) {
		this.number = number;
	}
	
	public Double getTotal() {
		return this.total;
	}
	
	public void setTotal(Double total) {
		this.total = total;
	}
	
	public String getString1() {
		return this.string1;
	}
	
	public void setString1(String string1) {
		this.string1 = string1;
	}
	
	public String getString2() {
		return this.string2;
	}
	
	public void setString2(String string2) {
		this.string2 = string2;
	}
	
	public String getString3() {
		return this.string3;
	}
	
	public void setString3(String string3) {
		this.string3 = string3;
	}
}
